From: Jan Beulich Date: Fri, 9 Dec 2016 11:06:51 +0000 (+0100) Subject: x86emul: constify write_segment() register pointer X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3213 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=c22a24c456f0edd21a9eccc7237685bd7f9655d8;p=xen.git x86emul: constify write_segment() register pointer Since I stumbled across this while looking for further constification opportunities, also correct the insn_fetch() related comment. Signed-off-by: Jan Beulich Reviewed-by: Paul Durrant Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index ebd59edb63..ed5ff91ce0 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -1439,7 +1439,7 @@ static int hvmemul_read_segment( static int hvmemul_write_segment( enum x86_segment seg, - struct segment_register *reg, + const struct segment_register *reg, struct x86_emulate_ctxt *ctxt) { struct hvm_emulate_ctxt *hvmemul_ctxt = diff --git a/xen/arch/x86/x86_emulate/x86_emulate.h b/xen/arch/x86/x86_emulate/x86_emulate.h index adbfe2a620..468047364c 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.h +++ b/xen/arch/x86/x86_emulate/x86_emulate.h @@ -200,7 +200,10 @@ struct x86_emulate_ops /* * insn_fetch: Emulate fetch from instruction byte stream. - * Parameters are same as for 'read'. @seg is always x86_seg_cs. + * Except for @bytes, all parameters are the same as for 'read'. + * @bytes: Access length (0 <= @bytes < 16, with zero meaning + * "validate address only"). + * @seg is always x86_seg_cs. */ int (*insn_fetch)( enum x86_segment seg, @@ -306,7 +309,7 @@ struct x86_emulate_ops */ int (*write_segment)( enum x86_segment seg, - struct segment_register *reg, + const struct segment_register *reg, struct x86_emulate_ctxt *ctxt); /*